package com.eorchis.module.newsuserlink.service.impl;

import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.eorchis.core.basedao.dao.IDaoSupport;
import com.eorchis.core.basedao.entity.IBaseEntity;
import com.eorchis.core.service.impl.AbstractBaseService;
import com.eorchis.module.news.ui.commond.NewsValidCommond;
import com.eorchis.module.newsuserlink.dao.INewsUserLinkDao;
import com.eorchis.module.newsuserlink.domain.NewsUserLink;
import com.eorchis.module.newsuserlink.service.INewsUserLinkService;
import com.eorchis.module.newsuserlink.ui.commond.NewsUserLinkValidCommond;

/**
 * Title: NewsUserLinkServiceImpl<br>
 * Description: 消息用户关联表管理业务接口实现<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author RongSL
 * @createDate 2016-05-06
 * @version $Revision$
 */
// 声明本类为Server实现类，声明bean名称
@Service(value = "com.eorchis.module.newsuserlink.service.impl.NewsUserLinkServiceImpl")
public class NewsUserLinkServiceImpl extends AbstractBaseService implements INewsUserLinkService {

	@Resource(name = "com.eorchis.module.newsuserlink.dao.impl.NewsUserLinkDaoImpl")
	private INewsUserLinkDao newsUserLinkDao;

	@Override
	public IDaoSupport getDaoSupport() {
		return newsUserLinkDao;
	}

	@Override
	@SuppressWarnings("unchecked")
	public NewsUserLinkValidCommond toCommond(IBaseEntity entity) {
		return new NewsUserLinkValidCommond((NewsUserLink)entity);
	}

	/**
	 * 批量发送消息
	 * @author RongSL
	 * 2017年12月12日
	 * */
	public Boolean batchSaveNewsUserLink(NewsValidCommond commond) throws Exception{
		return newsUserLinkDao.batchSaveNewsUserLink(commond);
	}
}
